import 'package:flutter/material.dart';
import 'home_main_view.dart'; //主界面01
import 'listView/list_vertical_view.dart'; //垂直列表
import 'listView/list_horizon_view.dart'; //水平列表
import 'listView/list_dynamic_view.dart'; //动态创建列表
import 'gridView/grid_view.dart'; //瀑布流列表
import 'packagView/packaging_view.dart';
import 'expand/expanded_view.dart';
import 'stack_align_positioned/stack_view.dart';
import 'card/card_view.dart';


void main(List<String> args) {
  runApp(const MaterialApp(
    home: Nav_Custom(),
    debugShowCheckedModeBanner: false,
  ));
}

//导航栏
// ignore: camel_case_types
class Nav_Custom extends StatelessWidget {
  const Nav_Custom({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(
          "导航栏标题",
          style: TextStyle(color: Colors.white),
        ),
        backgroundColor: Colors.yellow,
      ),
      body: const MainHomeView(),
    );
  }
}

// 显示的主界面

class MainHomeView extends StatelessWidget {
  const MainHomeView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
     // return IconContainView();
    // return IconContainView(icons, containerColor, iconSize)
    // return IconContainView(Icons.home);
    // return IconContainView(Icons.home);
    // return IconContainView(Icons.home,containerColor: Colors.black,);
    // return ExpandedView();
    // return Stack_MainView();
    // return Card_View();
    return HomePage_StatefullView();
  }
}



// 自定义一个绑定数据的界面
class HomePage_StatefullView extends StatefulWidget {
  HomePage_StatefullView({Key? key}) : super(key: key);
  @override
  _HomePage_StatefullViewState createState() => _HomePage_StatefullViewState();
}
class _HomePage_StatefullViewState extends State<HomePage_StatefullView> {
  String name = "你好flutter";
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(
        children: [
            SizedBox(height: 20,),
            Text("${this.name}"),
            SizedBox(height: 20,),
            ElevatedButton(onPressed: (){
              setState(() {
                name = "Hello 弗拉特";
              });
            }, child: Text("点击就变化值"))
        ],
      ),
    );
  }
}